package com.xiaozhengkeji.servlet.api.validation;

import com.xiaozhengkeji.servlet.tools.VFCode;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
@WebServlet("/api/validation/VFAPI")
public class VFAPI extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setCharacterEncoding("UTF-8");
        PrintWriter out = response.getWriter();
        response.setHeader("Content-type", "text/plain; charset=utf-8");
        out.write(VFCode.getVFCodeString(5));
    }
}
